Attachments

Upload a File to the File System

Code Customization
Upload a File to the File System (Not Applicable To Mobile)
Description:

This customization uploads a file to the application server's file system.

NOTE: If you want to upload an attachment to a database field, you do not need a code customization to do so. On the Property Sheet, set the Display Style of the Field Value control to "File UpLoad". Also see the "Upload an Attachment to a New Record" code customization to upload a file and save the file name to the database.

Procedure:

Step 1:  In Iron Speed Designer, switch to Layout Editor. Select a record panel or table panel.

Step 2:  Select any desired cell, then copy the following HTML code into the Cell Editor.

<input type="file" id="inputFile" name="inputFile" runat="server"/>

Step 3:  Drag and drop a Button (Themed) from the Toolbox to a desired cell

Remember the name of the button because you need to know this to select a value for the button control variable in the Code Customization Wizard.

Step 4:  Display the Property Sheet for the button.

Step 5:  In the Property Sheet, set the button text and tool tip text properties.

Step 6:  Also set the value for the "PostBack" pass-through attribute to "True". Set this attribute only if the button is inside a table or record control whose SmoothPanelUpdate pass-through attribute is true.

Step 7:  Build the application.

Step 9:  Create a folder called "Data" in your application's directory and set the folder's permissions to Read/Write.

Step 10:  Use this wizard to add code customization that handles OnClick event for the custom button.

Step 11:  If this code customization was added to Table Control Row, replace Me.Page.FindControlRecursively() with Me.FindControl() in the inserted code.

Step 12:  Build and run the application.

Disclaimer:
Customizations included in this wizard are provided as a sample to demonstrate a feature, and may work only in specific situations. The Iron Speed Designer support team cannot assist in the resolution of problems which may occur as a result of customizing your application or modifying a customization to fit a particular purpose.

Terms of Service Privacy Statement